Except whole words whithin a regular expression

Hello,

checking strings, I would like to ban some words using regular expressions.
There is a hint in the DXL documentation that it is possible to define exceptions for certain characters using ^abc where all characters are allowed except of a, b or c.

What I need is to have the possibility to define ^<forbiddenString> where <forbiddenString> is not allowd at the current place of the checked string.

Is it possible to have such a rule in a regular expression with DXL?

Many thanks in advance, Helko
Helko - Wed Feb 08 07:39:19 EST 2012

Re: Except whole words whithin a regular expression
Helko - Wed Feb 08 07:56:10 EST 2012

Ohh I see, the string I'm writing here will be missinterpreted by the forum software :)

I've ment (using spaces to avoid the missinterpretation) ^ abc

and ^ < forbiddenString >

Cheers, Helko

Re: Except whole words whithin a regular expression
Helko - Wed Feb 08 07:58:21 EST 2012

Helko - Wed Feb 08 07:56:10 EST 2012
Ohh I see, the string I'm writing here will be missinterpreted by the forum software :)

I've ment (using spaces to avoid the missinterpretation) ^ abc

and ^ < forbiddenString >

Cheers, Helko

Ahhh, ok I will use the preview in the future first:

Again: I've ment

[^abc]


and

 

[^<forbiddenString>]



Cheers, Helko



 

Re: Except whole words whithin a regular expression
Mathias Mamsch - Wed Feb 08 08:36:54 EST 2012

Helko - Wed Feb 08 07:56:10 EST 2012
Ohh I see, the string I'm writing here will be missinterpreted by the forum software :)

I've ment (using spaces to avoid the missinterpretation) ^ abc

and ^ < forbiddenString >

Cheers, Helko

The misinterpretation is due to the square brackets you have been using. To place [square brackets] in a text escape the first bracket by a backslash.

Normally with regexp you can do a lookahead assertion, but this does not seem to be supported by DOORS regexp. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS